﻿@using System.ComponentModel
@inject IStringLocalizer<CheckboxValidateForm> Localizer

<ValidateForm Model="@Model">
    <div class="row g-3 form-inline">
        <div class="col-12 col-sm-6">
            <Checkbox @bind-Value="@Model.BindValue" ShowLabel="true" />
        </div>
        <div class="col-12 col-sm-6">
            <Checkbox @bind-Value="@Model.BindValue1" ShowLabel="true" DisplayText="@Localizer["Checkbox3Text"]" />
        </div>
    </div>
</ValidateForm>

@code {
    private Foo Model { get; set; } = new Foo();

    private class Foo
    {
        [DisplayName("标签文字1")]
        public bool BindValue { get; set; }

        [DisplayName("标签文字2")]
        public bool BindValue1 { get; set; }
    }
}
